home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / etc / pm / sleep.d / 10_unattended-upgrades-hibernate < prev    next >
Text File  |  2009-07-20  |  682b  |  34 lines

  1. #!/bin/sh
  2.  
  3. # Action script ensure that unattended-upgrades is finished 
  4. # before a hibernate 
  5. #
  6. # Copyright: Copyright (c) 2009 Michael Vogt
  7. # License:   GPL-2
  8. #
  9.  
  10. PATH=/sbin:/usr/sbin:/bin:/usr/bin
  11.  
  12. if [ ! -x /usr/share/unattended-upgrades/unattended-upgrade-shutdown ]; then
  13.     exit 0
  14. fi
  15.  
  16. SELF=unattended-upgrades-hibernate
  17. COMMAND=
  18. IFPLUGD_IFACE=
  19.  
  20. # pm-action(8) - <action> <suspend method>
  21. #
  22. # On suspend|hibernate, disconnect any wpa-roam managed interfaces,
  23. # reconnect it on resume.
  24.  
  25. case "${1}" in
  26.         hibernate)
  27.              python /usr/share/unattended-upgrades/unattended-upgrade-shutdown       
  28.                 ;;
  29.         resume|thaw)
  30.         # nothing
  31.                 ;;
  32. esac
  33.  
  34.